3.476 \(\int \sec (c+d x) \sqrt{a+b \sin (c+d x)} \, dx\)

Optimal. Leaf size=74 \[ \frac{\sqrt{a+b} \tanh ^{-1}\left (\frac{\sqrt{a+b \sin (c+d x)}}{\sqrt{a+b}}\right )}{d}-\frac{\sqrt{a-b} \tanh ^{-1}\left (\frac{\sqrt{a+b \sin (c+d x)}}{\sqrt{a-b}}\right )}{d} \]

[Out]

-((Sqrt[a - b]*ArcTanh[Sqrt[a + b*Sin[c + d*x]]/Sqrt[a - b]])/d) + (Sqrt[a + b]*ArcTanh[Sqrt[a + b*Sin[c + d*x
]]/Sqrt[a + b]])/d

________________________________________________________________________________________

Rubi [A]  time = 0.11644, antiderivative size = 74, normalized size of antiderivative = 1., number of steps used = 5, number of rules used = 4, integrand size = 21, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.19, Rules used = {2668, 700, 1130, 206} \[ \frac{\sqrt{a+b} \tanh ^{-1}\left (\frac{\sqrt{a+b \sin (c+d x)}}{\sqrt{a+b}}\right )}{d}-\frac{\sqrt{a-b} \tanh ^{-1}\left (\frac{\sqrt{a+b \sin (c+d x)}}{\sqrt{a-b}}\right )}{d} \]

Antiderivative was successfully verified.

[In]

Int[Sec[c + d*x]*Sqrt[a + b*Sin[c + d*x]],x]

[Out]

-((Sqrt[a - b]*ArcTanh[Sqrt[a + b*Sin[c + d*x]]/Sqrt[a - b]])/d) + (Sqrt[a + b]*ArcTanh[Sqrt[a + b*Sin[c + d*x
]]/Sqrt[a + b]])/d

Rule 2668

Int[cos[(e_.) + (f_.)*(x_)]^(p_.)*((a_) + (b_.)*sin[(e_.) + (f_.)*(x_)])^(m_.), x_Symbol] :> Dist[1/(b^p*f), S
ubst[Int[(a + x)^m*(b^2 - x^2)^((p - 1)/2), x], x, b*Sin[e + f*x]], x] /; FreeQ[{a, b, e, f, m}, x] && Integer
Q[(p - 1)/2] && NeQ[a^2 - b^2, 0]

Rule 700

Int[Sqrt[(d_) + (e_.)*(x_)]/((a_) + (c_.)*(x_)^2), x_Symbol] :> Dist[2*e, Subst[Int[x^2/(c*d^2 + a*e^2 - 2*c*d
*x^2 + c*x^4), x], x, Sqrt[d + e*x]], x] /; FreeQ[{a, c, d, e}, x] && NeQ[c*d^2 + a*e^2, 0]

Rule 1130

Int[((d_.)*(x_))^(m_)/((a_) + (b_.)*(x_)^2 + (c_.)*(x_)^4), x_Symbol] :> With[{q = Rt[b^2 - 4*a*c, 2]}, Dist[(
d^2*(b/q + 1))/2, Int[(d*x)^(m - 2)/(b/2 + q/2 + c*x^2), x], x] - Dist[(d^2*(b/q - 1))/2, Int[(d*x)^(m - 2)/(b
/2 - q/2 + c*x^2), x], x]] /; FreeQ[{a, b, c, d}, x] && NeQ[b^2 - 4*a*c, 0] && GeQ[m, 2]

Rule 206

Int[((a_) + (b_.)*(x_)^2)^(-1), x_Symbol] :> Simp[(1*ArcTanh[(Rt[-b, 2]*x)/Rt[a, 2]])/(Rt[a, 2]*Rt[-b, 2]), x]
 /; FreeQ[{a, b}, x] && NegQ[a/b] && (GtQ[a, 0] || LtQ[b, 0])

Rubi steps

\begin{align*} \int \sec (c+d x) \sqrt{a+b \sin (c+d x)} \, dx &=\frac{b \operatorname{Subst}\left (\int \frac{\sqrt{a+x}}{b^2-x^2} \, dx,x,b \sin (c+d x)\right )}{d}\\ &=\frac{(2 b) \operatorname{Subst}\left (\int \frac{x^2}{-a^2+b^2+2 a x^2-x^4} \, dx,x,\sqrt{a+b \sin (c+d x)}\right )}{d}\\ &=-\frac{(a-b) \operatorname{Subst}\left (\int \frac{1}{a-b-x^2} \, dx,x,\sqrt{a+b \sin (c+d x)}\right )}{d}+\frac{(a+b) \operatorname{Subst}\left (\int \frac{1}{a+b-x^2} \, dx,x,\sqrt{a+b \sin (c+d x)}\right )}{d}\\ &=-\frac{\sqrt{a-b} \tanh ^{-1}\left (\frac{\sqrt{a+b \sin (c+d x)}}{\sqrt{a-b}}\right )}{d}+\frac{\sqrt{a+b} \tanh ^{-1}\left (\frac{\sqrt{a+b \sin (c+d x)}}{\sqrt{a+b}}\right )}{d}\\ \end{align*}

Mathematica [A]  time = 0.0534467, size = 74, normalized size = 1. \[ \frac{\sqrt{a+b} \tanh ^{-1}\left (\frac{\sqrt{a+b \sin (c+d x)}}{\sqrt{a+b}}\right )}{d}-\frac{\sqrt{a-b} \tanh ^{-1}\left (\frac{\sqrt{a+b \sin (c+d x)}}{\sqrt{a-b}}\right )}{d} \]

Antiderivative was successfully verified.

[In]

Integrate[Sec[c + d*x]*Sqrt[a + b*Sin[c + d*x]],x]

[Out]

-((Sqrt[a - b]*ArcTanh[Sqrt[a + b*Sin[c + d*x]]/Sqrt[a - b]])/d) + (Sqrt[a + b]*ArcTanh[Sqrt[a + b*Sin[c + d*x
]]/Sqrt[a + b]])/d

________________________________________________________________________________________

Maple [A]  time = 0.291, size = 63, normalized size = 0.9 \begin{align*} -{\frac{1}{d}\sqrt{-a+b}\arctan \left ({\sqrt{a+b\sin \left ( dx+c \right ) }{\frac{1}{\sqrt{-a+b}}}} \right ) }+{\frac{1}{d}{\it Artanh} \left ({\sqrt{a+b\sin \left ( dx+c \right ) }{\frac{1}{\sqrt{a+b}}}} \right ) \sqrt{a+b}} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(sec(d*x+c)*(a+b*sin(d*x+c))^(1/2),x)

[Out]

-1/d*(-a+b)^(1/2)*arctan((a+b*sin(d*x+c))^(1/2)/(-a+b)^(1/2))+arctanh((a+b*sin(d*x+c))^(1/2)/(a+b)^(1/2))*(a+b
)^(1/2)/d

________________________________________________________________________________________

Maxima [F(-2)]  time = 0., size = 0, normalized size = 0. \begin{align*} \text{Exception raised: ValueError} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(sec(d*x+c)*(a+b*sin(d*x+c))^(1/2),x, algorithm="maxima")

[Out]

Exception raised: ValueError

________________________________________________________________________________________

Fricas [B]  time = 6.07131, size = 4132, normalized size = 55.84 \begin{align*} \text{result too large to display} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(sec(d*x+c)*(a+b*sin(d*x+c))^(1/2),x, algorithm="fricas")

[Out]

[1/8*(sqrt(a + b)*log((b^4*cos(d*x + c)^4 + 128*a^4 + 256*a^3*b + 320*a^2*b^2 + 256*a*b^3 + 72*b^4 - 8*(20*a^2
*b^2 + 28*a*b^3 + 9*b^4)*cos(d*x + c)^2 + 8*(16*a^3 + 24*a^2*b + 20*a*b^2 + 8*b^3 - (10*a*b^2 + 7*b^3)*cos(d*x
 + c)^2 - (b^3*cos(d*x + c)^2 - 24*a^2*b - 28*a*b^2 - 8*b^3)*sin(d*x + c))*sqrt(b*sin(d*x + c) + a)*sqrt(a + b
) + 4*(64*a^3*b + 112*a^2*b^2 + 64*a*b^3 + 14*b^4 - (8*a*b^3 + 7*b^4)*cos(d*x + c)^2)*sin(d*x + c))/(cos(d*x +
 c)^4 - 8*cos(d*x + c)^2 + 4*(cos(d*x + c)^2 - 2)*sin(d*x + c) + 8)) + sqrt(a - b)*log((b^4*cos(d*x + c)^4 + 1
28*a^4 - 256*a^3*b + 320*a^2*b^2 - 256*a*b^3 + 72*b^4 - 8*(20*a^2*b^2 - 28*a*b^3 + 9*b^4)*cos(d*x + c)^2 - 8*(
16*a^3 - 24*a^2*b + 20*a*b^2 - 8*b^3 - (10*a*b^2 - 7*b^3)*cos(d*x + c)^2 - (b^3*cos(d*x + c)^2 - 24*a^2*b + 28
*a*b^2 - 8*b^3)*sin(d*x + c))*sqrt(b*sin(d*x + c) + a)*sqrt(a - b) + 4*(64*a^3*b - 112*a^2*b^2 + 64*a*b^3 - 14
*b^4 - (8*a*b^3 - 7*b^4)*cos(d*x + c)^2)*sin(d*x + c))/(cos(d*x + c)^4 - 8*cos(d*x + c)^2 - 4*(cos(d*x + c)^2
- 2)*sin(d*x + c) + 8)))/d, -1/8*(2*sqrt(-a - b)*arctan(-1/4*(b^2*cos(d*x + c)^2 - 8*a^2 - 8*a*b - 2*b^2 - 2*(
4*a*b + 3*b^2)*sin(d*x + c))*sqrt(b*sin(d*x + c) + a)*sqrt(-a - b)/(2*a^3 + 3*a^2*b + 2*a*b^2 + b^3 - (a*b^2 +
 b^3)*cos(d*x + c)^2 + (3*a^2*b + 4*a*b^2 + b^3)*sin(d*x + c))) - sqrt(a - b)*log((b^4*cos(d*x + c)^4 + 128*a^
4 - 256*a^3*b + 320*a^2*b^2 - 256*a*b^3 + 72*b^4 - 8*(20*a^2*b^2 - 28*a*b^3 + 9*b^4)*cos(d*x + c)^2 - 8*(16*a^
3 - 24*a^2*b + 20*a*b^2 - 8*b^3 - (10*a*b^2 - 7*b^3)*cos(d*x + c)^2 - (b^3*cos(d*x + c)^2 - 24*a^2*b + 28*a*b^
2 - 8*b^3)*sin(d*x + c))*sqrt(b*sin(d*x + c) + a)*sqrt(a - b) + 4*(64*a^3*b - 112*a^2*b^2 + 64*a*b^3 - 14*b^4
- (8*a*b^3 - 7*b^4)*cos(d*x + c)^2)*sin(d*x + c))/(cos(d*x + c)^4 - 8*cos(d*x + c)^2 - 4*(cos(d*x + c)^2 - 2)*
sin(d*x + c) + 8)))/d, -1/8*(2*sqrt(-a + b)*arctan(1/4*(b^2*cos(d*x + c)^2 - 8*a^2 + 8*a*b - 2*b^2 - 2*(4*a*b
- 3*b^2)*sin(d*x + c))*sqrt(b*sin(d*x + c) + a)*sqrt(-a + b)/(2*a^3 - 3*a^2*b + 2*a*b^2 - b^3 - (a*b^2 - b^3)*
cos(d*x + c)^2 + (3*a^2*b - 4*a*b^2 + b^3)*sin(d*x + c))) - sqrt(a + b)*log((b^4*cos(d*x + c)^4 + 128*a^4 + 25
6*a^3*b + 320*a^2*b^2 + 256*a*b^3 + 72*b^4 - 8*(20*a^2*b^2 + 28*a*b^3 + 9*b^4)*cos(d*x + c)^2 + 8*(16*a^3 + 24
*a^2*b + 20*a*b^2 + 8*b^3 - (10*a*b^2 + 7*b^3)*cos(d*x + c)^2 - (b^3*cos(d*x + c)^2 - 24*a^2*b - 28*a*b^2 - 8*
b^3)*sin(d*x + c))*sqrt(b*sin(d*x + c) + a)*sqrt(a + b) + 4*(64*a^3*b + 112*a^2*b^2 + 64*a*b^3 + 14*b^4 - (8*a
*b^3 + 7*b^4)*cos(d*x + c)^2)*sin(d*x + c))/(cos(d*x + c)^4 - 8*cos(d*x + c)^2 + 4*(cos(d*x + c)^2 - 2)*sin(d*
x + c) + 8)))/d, -1/4*(sqrt(-a + b)*arctan(1/4*(b^2*cos(d*x + c)^2 - 8*a^2 + 8*a*b - 2*b^2 - 2*(4*a*b - 3*b^2)
*sin(d*x + c))*sqrt(b*sin(d*x + c) + a)*sqrt(-a + b)/(2*a^3 - 3*a^2*b + 2*a*b^2 - b^3 - (a*b^2 - b^3)*cos(d*x
+ c)^2 + (3*a^2*b - 4*a*b^2 + b^3)*sin(d*x + c))) + sqrt(-a - b)*arctan(-1/4*(b^2*cos(d*x + c)^2 - 8*a^2 - 8*a
*b - 2*b^2 - 2*(4*a*b + 3*b^2)*sin(d*x + c))*sqrt(b*sin(d*x + c) + a)*sqrt(-a - b)/(2*a^3 + 3*a^2*b + 2*a*b^2
+ b^3 - (a*b^2 + b^3)*cos(d*x + c)^2 + (3*a^2*b + 4*a*b^2 + b^3)*sin(d*x + c))))/d]

________________________________________________________________________________________

Sympy [F]  time = 0., size = 0, normalized size = 0. \begin{align*} \int \sqrt{a + b \sin{\left (c + d x \right )}} \sec{\left (c + d x \right )}\, dx \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(sec(d*x+c)*(a+b*sin(d*x+c))**(1/2),x)

[Out]

Integral(sqrt(a + b*sin(c + d*x))*sec(c + d*x), x)

________________________________________________________________________________________

Giac [F]  time = 0., size = 0, normalized size = 0. \begin{align*} \int \sqrt{b \sin \left (d x + c\right ) + a} \sec \left (d x + c\right )\,{d x} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(sec(d*x+c)*(a+b*sin(d*x+c))^(1/2),x, algorithm="giac")

[Out]

integrate(sqrt(b*sin(d*x + c) + a)*sec(d*x + c), x)